//
//  LoginViewController.h
//  FaesFarma_iPad
//
//  Created by Jose on 04/07/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ActivityAlertView.h"
#import "RepasoAppAppDelegate.h"

#define ALLOW_STARTUP_WITHOUT_SYNCHRONIZATION YES

typedef enum{
    LoginViewControllerStatusRequestSynchronization = 0,
    LoginViewControllerStatusChangeUser
} LoginViewControllerStatus;

@interface LoginViewController : UIViewController <UIAlertViewDelegate,UITextFieldDelegate>{
    
    // Contexto
   
    LoginViewControllerStatus currentStatus;
    
    ActivityAlertView * activityAlert;

    
    BOOL firstTime;
    
    RepasoAppAppDelegate * appDelegate;
}

@property (nonatomic, retain) IBOutlet UITextField * usernameField;
@property (nonatomic, retain) IBOutlet UITextField * passwordField;

@property (nonatomic, retain) NSString * authURL;
@property (nonatomic, retain) RepasoAppAppDelegate * appDelegate;
// Acciones
- (IBAction) doCheckLogin: (id) sender;
- (IBAction) backgroundTap: (id)sender; 

- (void) stopIndicator;
- (void) startIndicator;
- (void) startIndicatorWithMessage: (NSString *) message;
- (void) changeIndicatorMessage: (NSString *) message;

@end
